{template order_header.html}
<script type="text/javascript">
  $(function() {
    $(".table-list tr").last().removeClass("dr_border_none");
  });
</script>
<div class="page-bar">
  <ul class="page-breadcrumb mylink">
    {$menu.link}
  </ul>
  <ul class="page-breadcrumb myname">
    {$menu.name}
  </ul>
  <div class="page-toolbar">
    <div class="btn-group pull-right">
      <button type="button" class="btn green btn-sm btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false" data-hover="dropdown"> {L('操作菜单')}
        <i class="fa fa-angle-down"></i>
      </button>
      <ul class="dropdown-menu pull-right" role="menu">
        {loop $menu.quick $t}
        <li>
          <a href="{$t.url}">{$t.icon} {$t.name}</a>
        </li>
        {/loop}
        <li class="divider"> </li>
        <li>
          <a href="javascript:window.location.reload();">
            <i class="icon-refresh"></i> {L('刷新页面')}</a>
        </li>
      </ul>
    </div>
  </div>
</div>

<div class="mytopsearch">
  <form method="post" class="row" action="" name="searchform" id="searchform">
    <input name="search" id="search" type="hidden" value="1" />
    <div class="col-md-12">
      <label>
        <select name="data[field]" class="form-control">
          <option value="" {if !$param.field}selected{/if}>--</option>
          {loop $field $t}
          <option value="{$t.fieldname}" {if $param.field==$t.fieldname}selected{/if}>{$t.name}</option>
          {/loop}
        </select>
      </label>
      <label><i class="fa fa-caret-right"></i></label>
      <label style="padding-right: 20px;"><input type="text" class="form-control" placeholder="输入文字内容" value="{$param['keyword']}" name="data[keyword]" /></label>
      <label>{L('下单时间')} ：</label>
      <label>{dr_field_input('start', 'Date', array('option'=>array('format'=>'Y-m-d','width'=>'100')), (int)$param.start)}</label>
      <label><i class="fa fa-minus"></i></label>
      <label style="margin-right:10px">{dr_field_input('end', 'Date', array('option'=>array('format'=>'Y-m-d','width'=>'100')), (int)$param.end)}</label>
      <label><button type="submit" class="btn green btn-sm" name="submit" > <i class="fa fa-search"></i> {L('搜索')}</button></label>
    </div>
  </form>
</div>
<div class="portlet light bordered">
  <div class="portlet-body">
    <div class="table-scrollable v3table">
      <form action="" method="post" name="myform" id="myform">
        <input name="action" id="action" type="hidden" value="" />
        <table class="table dr_table">
          <thead>
          <tr>
            <th></th>
            <th class="{ns_sorting('id')}" name="id" width="160">{L('订单号')}</th>
            <th class="{ns_sorting('buy_uid')}" name="buy_uid" width="150">{L('买家')}</th>
            <th class="{ns_sorting('sell_uid')}" name="sell_uid" width="150">{L('商家')}</th>
            <th class="{ns_sorting('price')}" name="order_price">{L('价格')}</th>
            <th class="{ns_sorting('order_time')}" name="order_time" width="150">{L('下单时间')}</th>
            <th class="{ns_sorting('order_status')}" name="order_status">{L('状态')}</th>
            <th></th>
          </tr>
          </thead>
          <tbody>
          {loop $list $t}
          <tr>
            <td><input name="ids[]" type="checkbox" class="dr_select toggle md-check" value="{$t.id}" /></td>

            <td><a href="{dr_url('order/home/info', array('id'=>$t.id))}">{$t.sn}</a></td>

            <td><a href="javascript:;" onclick="dr_dialog_member('{$t.buy_uid}')">{$t.buy_name}</a></td>
            <td><a href="javascript:;" onclick="dr_dialog_member('{$t.sell_uid}')">{$t.sell_name}</a></td>

            <td>¥{number_format($t.price, 2)}</td>
            <td>{dr_date($t.order_time, '', 'red')}</td>
            <td>{dr_order_status($t)}</td>
            <td class="order_p_table">
              {dr_order_member_option($t.sell_uid, $t)}
              <p><a href="{dr_url('order/home/marketInfo', array('id'=>$t.id))}" class="btn blue btn-xs"> <i class="fa fa-shopping-cart"></i> {L('订单详情')}</a></p>
            </td>
          </tr>
          {/loop}
          <tr>
            <th width="20"><input name="dr_select" class="toggle md-check" id="dr_select" type="checkbox" onClick="dr_selected()" /></th>
            <td colspan="99">
              <label><button type="button" class="btn red btn-sm" name="option" onClick="$('#action').val('del');dr_confirm_set_all('{L('您确定要这样操作吗？')}')"> <i class="fa fa-trash"></i> {L('删除')}</button></label>
            </td>
          </tr>
          </tbody>
        </table>

      </form>
      <div id="pages"><a>{L('共%s条', $param.total)}</a>{$pages}</div>
    </div>
  </div>
</div>


{template nfooter.html}